import React from 'react'
import IndexRouter from './router/IndexRouter'
import './App.css';
//1.从导入react-redux导入Provide组件
import { Provider } from 'react-redux'
//2.把store导入
import { store, persistor } from './redux/store'
//引入持久化的网关
import { PersistGate } from 'redux-persist/integration/react'

export default function App() {
    return (
        // {/* 3.在App外层包裹Provide并且把store传入 */}
        <Provider store={store}>
            <PersistGate loading={null} persistor={persistor}>
                <IndexRouter></IndexRouter>
            </PersistGate>
        </Provider>

    )
}

